/**
 * Note: The returned array must be malloced, assume caller calls free().
 */
int* findIntersectionValues(int* nums1, int nums1Size, int* nums2, int nums2Size, int* returnSize)
{
    int *res = (int *)malloc(sizeof(int) * 2);
    res[0]=0;
    res[1]=0;
    
    for (int i = 0; i < nums1Size; i++)
    {
        for (int j = 0; j < nums2Size; j++)
        {
            if (nums1[i] == nums2[j])
            {
                res[0]++;
                break;
            }
        }
    }

    for (int i = 0; i < nums2Size; i++)
    {
        for (int j = 0; j < nums1Size; j++)
        {
            if (nums2[i] == nums1[j])
            {
                res[1]++;
                break;
            }
        }
    }
    
    *returnSize = 2; // 设置返回的交集大小
    return res; // 返回交集结果
}